{$layout}

<div class="ui menu text small blue">
	<a href="/notices?read=0" class="item">未读通知<span> &nbsp;({{countUnread}})</span></a>
	<a href="/notices?read=1" class="item">已读通知</a>
	<a href="/notices/setting" class="item">级别</a>
	<a href="/notices/medias" class="item active">媒介</a>
</div>

<div class="ui divider"></div>

<div class="ui menu text blue tiny">
	<a href="/notices/medias" class="item active">所有媒介</a>
	<a href="/notices/addMedia" class="item">添加媒介</a>
</div>
<div class="ui divider"></div>

<p class="comment">媒介是用来发送通知的渠道。</p>

<p class="comment" v-if="medias.length == 0">暂时还没有可用的媒介。</p>

<table class="ui table selectable" v-if="medias.length > 0">
	<thead>
		<tr>
			<th>媒介名称</th>
			<th class="two op">操作</th>
		</tr>
	</thead>
	<tr v-for="media in medias">
		<td>{{media.name}}<br/>
			<span class="ui label tiny" v-if="!media.on">未开启</span>
			<span class="ui label tiny">{{media.typeName}}</span>
		</td>
		<td>
			<a :href="'/notices/mediaDetail?mediaId=' + media.id">详情</a>&nbsp;&nbsp;
			<a href="" @click.prevent="deleteMedia(media.id)">删除</a>
		</td>
	</tr>
</table>